<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Sample</title>
<meta name="viewport"
            content="width=device-width, initial-scale=1.0">
<meta name="HandheldFriendly" content="true">
</head>
<body>
<canvas id="myCanvas" width="300" height="150"
        style="border:1px dashed #c3c3c3;">
   这里放置的内容用于浏览器不支持Canvas的情况
</canvas>
<script>
var canvas = document.getElementById("myCanvas");
if (canvas && canvas.getContext) {
   var cxt = canvas.getContext("2d");
   cxt.fillStyle = "#FF0000"; // 由于仅仅绘制线条，所以填充设置没有用
   cxt.strokeStyle = "#0000FF";
   cxt.lineWidth   = 4;

   cxt.moveTo(10,10);
   cxt.arcTo(50,50,100,50,50);
   cxt.lineTo(150,70);  // 再绘制一个直线
   cxt.fill();
   cxt.stroke();
}
</script>
</body>
</html>
